NAME		= zappy

############### GCC CONFIG

CC		= gcc
RM		= rm -rf
CFLAGS		+= -W -Wall -ansi -pedantic

############### DIRECTORIES

DIR		= ./

D_SRC		= ./

D_TRAN		= ../../smap/trantor/trantorian/

D_RSC           = ../../smap/trantor/resources/

D_MAP		= ../../smap/trantor/map/

D_CASE		= ../../smap/trantor/case/

############### FILES
OBJS		= $(SRC:.c=.o)
SRC		= 			\
    $(D_SRC)main.c      		\
    $(D_SRC)init_env.c			\
    $(D_SRC)set_fds.c			\
    $(D_SRC)set_socket.c	     	\
    $(D_SRC)read_buff_from_socket.c	\
    $(D_SRC)bind_socket.c		\
    $(D_SRC)loop.c			\
    $(D_SRC)accept_client.c		\
    $(D_SRC)time.c			\
    $(D_SRC)current_time.c		\
    $(D_SRC)config_server.c		\
    $(D_SRC)add_team.c			\
    $(D_SRC)display_team.c		\
    $(D_SRC)manage_cmd.c		\
    $(D_SRC)cmd_graph.c			\
    $(D_SRC)cmd_text.c			\
    $(D_SRC)add_player.c		\
    $(D_SRC)disconnect_socket.c		\
    $(D_SRC)connected_socket.c		\
    $(D_SRC)add_request.c		\
    $(D_SRC)format.c			\
    $(D_SRC)request_parser.c		\
    $(D_SRC)cmd_avance.c		\
    $(D_SRC)cmd_broadcast_text.c	\
    $(D_SRC)cmd__.c			\
    $(D_SRC)cmd_connect_nbr.c		\
    $(D_SRC)cmd_droite.c		\
    $(D_SRC)cmd_expulse.c		\
    $(D_SRC)cmd_fork.c			\
    $(D_SRC)cmd_gauche.c		\
    $(D_SRC)cmd_incantation.c		\
    $(D_SRC)cmd_inventaire.c		\
    $(D_SRC)cmd_pose_obj.c		\
    $(D_SRC)cmd_prend_obj.c		\
    $(D_SRC)cmd_voir.c			\
    $(D_SRC)parser.c			\
    $(D_SRC)func_for_parser.c		\
    $(D_TRAN)trantorian.c		\
    $(D_RSC)resources.c			\
    $(D_MAP)map.c			\
    $(D_CASE)case_add.c			\
    $(D_CASE)case.c			\
    $(D_CASE)case_remove.c		\
################ COMMANDS

$(NAME)	: $(OBJS)
	@echo "Compiling Source in Progress...."
	$(CC) $(CFLAGS) $(SRC) -g -I ../inc/  -o $(NAME)

all	:	$(NAME)

clean	:
		$(RM) $(OBJS)

fclean	:	clean
		$(RM) $(NAME)

re	:	fclean all

.PHONY	:	all clean fclean re

.c.o	:
		$(CC) $(CFLAGS) -c $< -o $@

#EOF
